package com.som.quanlydiem;
import java.util.Scanner;

public class SinhVien {
	String name;
	int id;
	float basicJava, advanceJava, cSharp, advanceCSharp, rdbms, sql2008;
	float average;
	String rank;
	public void input() {
		Scanner scan = new Scanner(System.in);
		System.out.println("Studen:");
		System.out.print("--- name: ");
		name = scan.next();
		System.out.print("--- id: ");
		id = scan.nextInt();
		System.out.print("--- basic java: ");
		basicJava = scan.nextFloat();
		System.out.print("--- advance java: ");
		advanceJava = scan.nextFloat();
		System.out.print("--- c#: ");
		cSharp = scan.nextFloat();
		System.out.print("--- advance c#: ");
		advanceCSharp = scan.nextFloat();
		System.out.print("--- rdbms: ");
		rdbms = scan.nextFloat();
		System.out.print("--- sql 2008: ");
		sql2008 = scan.nextFloat();
		
		average = (basicJava + advanceJava + cSharp + advanceCSharp + rdbms + sql2008)/6;
		
		if (average > 9) {
			rank = "exelent";
		} else if (average > 8) {
			rank = "good";
		} else if (average > 7) {
			rank = "fair";
		} else if (average > 5) {
			rank = "ok";
		} else {
			rank = "weak";
		}
		
		System.out.println(name+" (id="+id+") has average mark of "+average+", rank '"+rank+"'");
	}
	
	
}
